package com.linkeleee.user.remote.service;

import com.linkeleee.core.response.APIResponse;
import com.linkeleee.user.api.LoginRpcService;
import com.linkeleee.user.request.LoginReq;
import com.linkeleee.user.response.LoginResp;
import com.linkeleee.user.service.LoginService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 登陆rpc服务
 * @author liyaoyang
 */

@DubboService
@Slf4j
public class LoginRpcServiceImpl implements LoginRpcService {

    @Autowired
    private LoginService loginService;

    public APIResponse<LoginResp> login(String userName, String password) {
        return APIResponse.success(loginService.login(userName,password));
    }
}
